package com.sym.architecture

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.sym.architecture.utils.AppUtils

class CalActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val defaultDisplay = windowManager.defaultDisplay
        val params = window.attributes
        params.height = (defaultDisplay.height * 0.7).toInt()
        params.width = (defaultDisplay.width * 0.7).toInt()
        window.attributes = params

        val pak = AppUtils.getAllApps(this, "Calculator", "calculator")
        if (null != pak) {
            val intent = packageManager.getLaunchIntentForPackage(pak.packageName)
            startActivity(intent)
        }
    }
}